#include <iostream>
using namespace std;

int main()
{
	int ret = 0;
	for (int i = 1; i <= 202504; i++)
	{
		int b = i, sum = 0;
		while (b)
		{
			sum += b % 10;
			b /= 10;
		}
		if (sum % 5 == 0)
			ret++;
	}
	cout << ret << endl;

	return 0;
}